import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
import numpy as np

matplotlib.rcParams['font.sans-serif'] = ['SimHei']
plt.figure(figsize=(10, 6), dpi=100)

df = pd.read_csv('数据分析.csv')
df.dropna(inplace=True)
key_list = []
for i in df:
    key_list.append(i)

plt.plot(df[key_list[0]], df[key_list[1]], '-', color='blue', label='数据')
plt.xticks(rotation=-45)
plt.xlabel(key_list[0])
plt.ylabel(key_list[1])
plt.title('数据分析')
plt.legend()
plt.grid()
plt.show()
